package com.test;

import com.util.DisposeNinePatch;
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.FlowPane;
import javafx.scene.layout.HBox;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import javafx.stage.Stage;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

public class test extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception {
        HBox hBox = new HBox();
        Text t = new Text("欧瑞伟aojofd");

        File file = DisposeNinePatch.creatLargePic("D:/2/1/1.9.png",500,100);
        InputStream is = DisposeNinePatch.zoomPic(file,480,50);
        ImageView imageView = new ImageView(new Image(is));

        imageView.setFitHeight(50);
        imageView.setFitWidth(480);
        t.setFont(Font.loadFont("file:src\\com\\Droid Sans Fallback.ttf",50));
       hBox.getChildren().add(imageView);
        primaryStage.setScene(new Scene(hBox,480,800));
        primaryStage.show();
    }

    public static void main(String[] args) {
launch(args);
    }


}
